How to run JavaScript from PHP?
JavaScript is the client side scripting language and PHP is the server side scripting language. JavaScript is used as client side to check and verify client details and PHP is server side used to interact with database. In PHP, HTML is used as a string in the code. In order to render it to the browser, we produce JavaScript code as a string in the PHP code....
read more
How to use an ES6 import in Node.js?
ES6 or ECMAScript 2015 is the 6th edition of the ECMAScript language specification standard. It defines the standard on how to implement JavaScript....
read more
JavaScript Multidimensional Array
Multidimensional arrays are not directly provided in JavaScript. If we want to use anything which acts as a multidimensional array then we need to create a multidimensional array by using another one-dimensional array. So multidimensional arrays in JavaScript is known as arrays inside another array. We need to put some arrays inside an array, then the total thing is working like a multidimensional array. The array, in which the other arrays are going to insert, that array is use as the multidimensional array in our code. To define a multidimensional array its exactly the same as defining a normal one-dimensional array....
read more
How to parse float with two decimal places in JavaScript ?
JavaScript is a client-side scripting language that’s high-level, dynamically typed, and interpreted. It comes with a built-in method called parseFloat() which is used to convert a string into a floating-point number....
read more
Design a webpage for online food delivery system using HTML and CSS
To design a attractive webpage for an online food delivery system using HTML and CSS, craft a user-friendly interface with navigation, engaging content sections, and responsive design to enhance the overall dining experience. Also add the basic pages “Home,” “About,” “Menu,” and “Contact Us,” featuring the company logo “Online FoodShop”....
read more
Get and Post method using Fetch API
The fetch() method is used to send the requests to the server without refreshing the page. It is an alternative to the XMLHttpRequest object.The basic syntax of a fetch() request is as follows:...
read more
How to align content of a div to the bottom using CSS ?
Basic property of CSS:...
read more
JavaScript Program to write data in a text File
In this article, we are going to learn how can we write data in a text file. There is a built-in Module or in-built library in NodeJs that handles all the writing operations called fs (File-System). It is basically a JavaScript program (fs.js) where a function for writing operations is written. Import fs-module in the program and use functions to write text to files in the system....
read more
Space between two rows in a table using CSS?
The space between two rows in a table can be done using CSS border-spacing and border-collapse property. The border-spacing property is used to set the spaces between cells of a table and border-collapse property is used to specify whether the border of table is collapse or not. The border-spacing attribute can only be used if border-collapse attribute is set to separate....
read more
Simple Tic-Tac-Toe Game using JavaScript
In this article, we will create a Tic-Tac-Toe Game using JavaScript. We will be using validation checks to implement the game features. The UI is designed using CSS so it is easy to create. In the game, Player-1 starts playing the game and both players make their moves in consecutive turns. The player who makes a straight 3-block chain wins the game. This game is built on the front-end using simple logic and validation checks only....
read more
How to pass data into a bootstrap modal?
Bootstrap is a CSS framework used for designing web pages. Bootstrap v4.5 is the latest release. Bootstrap along with HTML and JavaScript can be used to build responsive web pages....
read more
How to remove the first character of string in PHP?
Remove the very first character of a given string in PHP Examples:...
read more